home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Leser 19
/
Amiga Plus Leser CD 19.iso
/
Tools
/
Freeware
/
PerfectPaint
/
rexx
/
text
/
FlatShade.rx
< prev
next >
Wrap
Text File
|
2001-12-20
|
2KB
|
95 lines
/*
FlatShade.rx
Adds an outline and a sharp shadow to text
*/
options results
parse ARG Port x y b
ADDRESS value Port
SX=3
SY=3
F=1
if EXISTS('PerfectPaint:Prefs/Rexx_Prefs/flatshade') THEN DO
IF OPEN('lfile','PerfectPaint:Prefs/Rexx_Prefs/flatshade', "R") then DO
SX = READLN('lfile')
SY = READLN('lfile')
F = READLN('lfile')
CALL CLOSE('lfile')
END
END
pp_AvoidRefresh
pp_DialogInit 150 95 "*Flatshade*" 3
pp_Integer 0 60 5 50 16 "Shift*X" 1 SX
pp_Integer 1 60 25 50 16 "Shift*Y" 1 SY
pp_Integer 2 60 45 50 16 "Outline" 1 F
pp_Dialog
rc=result
if rc=0 then
do
pp_PermitRefresh
EXIT
end
pp_GetDialog 0
sx=result
pp_GetDialog 1
sy=result
pp_GetDialog 2
F=Result
pp_AvoidRefresh
pp_UpdateUndo
pp_GetApen
AP=result
pp_GetBpen
BP=result
texte=""
pp_SetApen BP
pp_TextEffect 0 1 /*no effect*/
pp_TextMake texte /*make current text*/
pp_TextDraw x y
pp_SetApen AP
pp_TextMake texte
pp_TextDraw x-sx y-sy
if f>0 then do
pp_SetaPen BP
pp_TextEffect 1 f-1 /*Outline*/
pp_TextMake texte
pp_TextDraw x-sx y-sy
END
pp_setapen ap
CALL SavePrefs('flatshade',SX,SY,F)
pp_PermitRefresh
SaveePrefs: PROCEDURE
Prefname='PerfectPaint:Prefs/Rexx_Prefs/'||ARG(1)
if EXISTS(Prefname) THEN DO
ADDRESS COMMAND
'delete >nil: '||Prefname
END
IF OPEN('pfile',PrefName,'W') THEN DO
do i=2 to ARG()
CALL WRITELN('pfile',ARG(i))
end
CALL CLOSE('pfile')
RETURN